import { Controller,Get,Query } from '@nestjs/common';
import { HomeService as Service } from '../services/home.service';

@Controller('adminhome')
export class HomeController {

    constructor(private readonly service: Service) { }

    /**
    * 获取告警统计数据
    * @param query 
    */
   @Get('getAlert')
   getAlert(@Query() query) {
       return this.service.getAlert(query);
   }

   /**
   * 获取能耗数据
   * @param query 
   */
   @Get('getEnergy')
   getEnergy(@Query() query) {
       return this.service.getEnergy(query);
   }
}
